<template>
	<!-- 查看消息 -->
	<view class="container">
		<view class="content">
			<view class="title">
				<image src="../../../static/icon/tongzhi.png" mode=""></image>
				<view class="text">
					系统消息
				</view>
			</view>
			<view class="box">
				{{info.content}}
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				token:'',
				info:''
			};
		},
		onLoad(e) {
			this.token=e.token
			uni.showLoading({
				title: '加载中',
				mask: false
			});
			uni.request({
				url: this.webUrl+'/user/my/newsDetail/'+e.id,
				method: 'PUT',
				header:{
					token:e.token
				},
				data: {},
				success: res => {
					// console.log(res)
					uni.hideLoading()
					if(res.data.code==0){
						this.info=res.data.data
					}else if(res.data.code==3){
						uni.showToast({
							title: res.data.msg,
							icon:'none',
							duration:2000
						});
					}else{
						uni.showToast({
							title: '网络错误',
							icon:'none',
							duration:2000
						});
					}
				},
				fail: () => {
					uni.showToast({
						title: '网络错误',
						icon:'none',
						duration:2000
					});
				},
				complete: () => {}
			});
		}
	}
</script>

<style lang="scss" scoped>
	.container{
		position: absolute;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background: #F2F2F2;
		overflow: hidden;
		.content{
			background: #FFFFFF;
			margin-top: 30upx;
			.title{
				display: flex;
				border-bottom: 2upx solid #EDEDED;
				margin: 0 30upx;
				image{
					width: 70upx;
					height: 70upx;
					margin: 24upx 24upx 24upx 0upx;
				}
				.text{
					font-size:32upx;
					font-family:Microsoft YaHei;
					font-weight:bold;
					margin-top: 44upx;
					line-height: 32upx;
					padding-bottom: 42upx;
					color:rgba(52,52,52,1);
				}
			}
			.box{
				margin: 22upx 50upx;
				padding-bottom: 22upx;
				font-size:26upx;
				font-family:Microsoft YaHei;
				font-weight:400;
				color:rgba(51,51,51,1);
				line-height:40upx;
			}
		}
	}
</style>
